//    Copyright (C) Kherty.  All rights reserved.
using System;

namespace OpenLS.Spreadsheet.Expressions
{
    class InvalidRangeReference: RangeReference
    {
        private readonly Worksheet _worksheet;

        public InvalidRangeReference(Worksheet worksheet)
        {
            _worksheet = worksheet;
        }

        public override Worksheet Worksheet
        {
            get { return _worksheet; }
        }

        protected override Range GetRange()
        {
             { return null;}
        }

        public override string Label
        {
            get { return string.Format("{0}" + Ref, _worksheet.Name); }
        }

        public override RangeReference Offset(CellRelativeAddress address)
        {
            return this;
        }
        internal override RangeReference Transposed(Cell target)
        {
            return this;
        }

        internal override RangeReference Projected(Worksheet targetWorksheet)
        {
            return this;
        }

        internal const string Ref = "#REF!";
    }
}